package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.CategoryAllBeen;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.HomeSearchXFDGoodBeen;
import cn.xfdzx.android.apps.shop.bean.StoreInfoBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface StoreInfoContract {
    interface Model {
        Flowable<StoreInfoBeen> initData(String store_id,String sales_model);
        Flowable<HomeSearchXFDGoodBeen> initList( String lng,  String lat,String sid, String page, String limit, String index_status, String is_store, String store_id, String keyword, String priceOrder, String salesOrder, String news);
        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);
        //关注店铺
        Flowable<StoreInfoBeen> getFocusShop(String storeid);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onInitSuccess(StoreInfoBeen bean);
        void onListSuccess(HomeSearchXFDGoodBeen bean);
        void onAddCarSuccess(ConfirmGoodBeen bean,int position,int total_num);
        //关注店铺
        void getFocusShopSuccess(StoreInfoBeen bean);
        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();
    }

    interface Presenter {
        /**

         */
        void initData(String store_id,String sales_model);
        void initList(boolean isRefresh,boolean isLoading, String lng,  String lat,String sid, String page, String limit, String index_status, String is_store, String store_id, String keyword, String priceOrder, String salesOrder, String news);
        void addCar(String is_new,String uniqueId,String productId,String cartNum,int position,int total_num);
        void getFocusShop(String storeid);
    }
}
